<?php
$base = "../images/recipes/";
if(isset($_GET['recipe_id']) && file_exists($base.$_GET['recipe_id'].".jpg")):
	$source = $base.$_GET['recipe_id'].".jpg";
	header('Content-Type: image/jpeg');
else:
	$source = $base.'default.png';
	header('content-type: image/png');
endif;
$im = file_get_contents($source); 
echo $im; 
?>